package main

import(
  "fmt"
  "io"
  "net/http"
)

func main(){
 res, err := http.Get("http://www.baidu.com")
 defer res.Body.Close()
 if err != nil {
   panic(err)
 }
 resP := make([]byte , 50)
 _, err = io.ReadFull(res.Body, resP)
 if err != nil {
   panic(err)
 }
 fmt.Println(string(resP))
 fmt.Println(res.Status)
}
